import { Component, OnInit,Input } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';

@Component({
  selector: 'app-infosetting',
  templateUrl: './infosetting.component.html',
  styleUrls: ['./infosetting.component.css']
})
export class InfosettingComponent implements OnInit {

  public isopen:number;
  constructor( private router: Router,
               private route: ActivatedRoute) { }

  ngOnInit() {
    this.route.params.subscribe((params) => {
      this.isopen = params["id"];
      if(this.isopen==1){
        this.router.navigate(['/main/infosetting/1/editpersoninfo']);
      }
      if(this.isopen==2){
        this.router.navigate(['/main/infosetting/2/editpassword']);
      }
    });
  }

}
